You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > StatTimeSerAnalysis Class > StatTimeSerAnalysis Methods > SingleExpSmooth Method > StatTimeSerAnalysis.SingleExpSmooth Method ([In] TVec, [In] TVec, [In] double, out double, [In] int)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
StatTimeSerAnalysis.SingleExpSmooth Method ([In] TVec, [In] TVec, [In] double, out double, [In] int)

In this case a fixed smoothing constant Alpha is used in smoothing equations (no minimization is performed).

Syntax
C#
Visual Basic
public static void SingleExpSmooth([In] TVec Y, [In] TVec S, [In] double Alpha, out double MSE, [In] int InitMethod);
Parameters 
Description 
[In] TVec Y 
Time series data set. 
[In] TVec S 
Smoothed values (see above equation). Size and complex properties of S are set automatically. 
[In] double Alpha 
Defines initial estimate for Alpha, returns Alpha which minimizes MSE. 
out double MSE 
Returns MSE, evaluated for constant Alpha. 
[In] int InitMethod 
Defines how the initial values for S[0] are calculated. 

C# Example Load data, perform smoothing with Alpha = 0.33.

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector Data = new Vector(0); Vector S = new Vector(0); Data.LoadFromFile("aerosol_particles.vec"); // smooth data with Alpha=0.33 double MSE; StatTimeSerAnalysis.SingleExpSmooth(Data,S,0.33,out MSE,0); // results: MSE } }

Load data, perform smoothing with Alpha = 0.33.

Uses MtxExpr, StatTimeSerAnalysis, Math387; procedure Example; var Data,S: Vector; MSE: double; begin Data.LoadFromFile('aerosol_particles.vec'); // smooth data with Alpha=0.33 SingleExpSmooth(Data,S,0.33,MSE,0); // results: MSE end;
#include "MtxExpr.hpp" #include "Math387.hpp" #include "StatTimeSerAnalysis.hpp" void __fastcall Example(); { sVector Data,S; Data.LoadFromFile("aerosol_particles.vec"); // smooth data with Alpha=0.33 double MSE; SingleExpSmooth(Data,S,0.33,MSE,0); // results: MSE }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!